package java_exceptions;

public class Practice7{
	static int divide (int x, int y) 
				throws DivideByZeroException{
		if (y == 0){
			throw new DivideByZeroException
					(new ArithmeticException());
		}else {
			return x / y;
		}
	}
	public static void main(String[] args) {
		try {
			System.out.println(divide(10,0));
		}catch(DivideByZeroException e){
			System.out.println(e.toString());
			System.out.println("Cause : " +
						e.getCause().toString());
		}
	}
}
